package com.itfreer.gis.server.mercator;

/**
 * 定义墨卡托投影的切片级别
 */
public class TileLevel {
	public static Double GetTileResolution(Integer level) {
		Double resolution = 0.703125000000001;
		switch (level) {
		case 0:
			resolution = 0.703125000000001;
			break;
		case 1:
			resolution = 0.351562500000001;
			break;
		case 2:
			resolution = 0.17578125;
			break;
		case 3:
			resolution = 8.78906250000002E-02;
			break;
		case 4:
			resolution = 4.39453125000001E-02;
			break;
		case 5:
			resolution = 0.02197265625;
			break;
		case 6:
			resolution = 0.010986328125;
			break;
		case 7:
			resolution = 5.49316406250001E-03;
			break;
		case 8:
			resolution = 0.00274658203125;
			break;
		case 9:
			resolution = 0.001373291015625;
			break;
		case 10:
			resolution = 6.86645507812501E-04;
			break;
		case 11:
			resolution = 3.43322753906251E-04;
			break;
		case 12:
			resolution = 1.71661376953125E-04;
			break;
		case 13:
			resolution = 8.58306884765626E-05;
			break;
		case 14:
			resolution = 4.29153442382813E-05;
			break;
		case 15:
			resolution = 2.14576721191407E-05;
			break;
		case 16:
			resolution = 1.07288360595703E-05;
			break;
		case 17:
			resolution = 5.36441802978517E-06;
			break;
		case 18:
			resolution = 2.68220901489258E-06;
			break;
		case 19:
			resolution = 1.34110450744629E-06;
			break;
		}
		return resolution;
	}
}
